﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using BonjourHotel.Core.Localization;

namespace BonjourHotel.Application.Controls.StatusBar
{
    public partial class LastLogin : System.Web.UI.UserControl
    {
        protected void Page_Init(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DateTime lastLogin = Membership.GetUser().LastLoginDate;
                string lastLoginString = LocaleManager.GetLocaleString("StatusBar.LastLogin.LastLoginText");
                lblLastLogin.Text = String.Format("{0}: {1}", lastLoginString, lastLogin.ToString());
            }
        }
    }
}